package org.wpahs.ahn.rssfeed;

import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

/**
 * Used for better performance than Lists
 * Created by dgambone on 02/06/2015.
 */
public class SparseArrayAdapter<E> extends BaseAdapter {
        private SparseArray<E> mData;
        public void setData(SparseArray<E> data){
            mData = data;
        }
        @Override
        public int getCount() {
            return mData.size();
        }

        @Override
        public Object getItem(int position) {
            return mData.valueAt(position);
        }

        @Override
        public long getItemId(int position) {
            return mData.keyAt(position);
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            return null;
        }

}
